package ThreadTest;
/*
采用匿名内部类的方式
 */
public class ThreadTest3 {
    public static void main(String[] args) {
        Thread myThread = new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i = 0; i < 100; i++){
                    System.out.println("run--->"+i);
                }
            }
        });
        myThread.start();
        for(int i = 0; i < 100; i++){
            System.out.println("main--->"+i);
        }
    }
}
